Skip to content

FOUR-8554 Refactor Sub Processes functions to use Nayra BPMN engine#4977

Merged
caleeli merged 3 commits into
FOUR-8177from
FOUR-8554
Jul 13, 2023
Merged

FOUR-8554 Refactor Sub Processes functions to use Nayra BPMN engine#4977
caleeli merged 3 commits into
FOUR-8177from
FOUR-8554

Conversation

@caleeli
Copy link
Copy Markdown
Contributor

@caleeli caleeli commented Jul 11, 2023

Solution

This PR refactors the callProcess function to use the Nayra BPMN engine. This improves reliability, enables process calls by ID using a CallProcess event, and includes thorough testing for error handling.

How to Test

Run a process with SubProcesses. (See the attached file)

Scenario 1

  • In the attached file there are a Parent Process and a Child process
  • Run the parent process
  • In the form task of the sub process fill a value in the input text
  • Complete the task
  • It will complete the child and the parent process

Scenario 2

  • In the attached file there are a Parent Process and a Child process
  • Run the parent process
  • In the form task of the sub process fill "error" in the input text
  • Complete the task
  • It will complete the child and the parent process will go to ERROR state in the element "Sub Process"

Related Tickets & Packages

Code Review Checklist

  • I have pulled this code locally and tested it on my instance, along with any associated packages.
  • This code adheres to ProcessMaker Coding Guidelines.
  • This code includes a unit test or an E2E test that tests its functionality, or is covered by an existing test.
  • This solution fixes the bug reported in the original ticket.
  • This solution does not alter the expected output of a component in a way that would break existing Processes.
  • This solution does not implement any breaking changes that would invalidate documentation or cause existing Processes to fail.
  • This solution has been tested with enterprise packages that rely on its functionality and does not introduce bugs in those packages.
  • This code does not duplicate functionality that already exists in the framework or in ProcessMaker.
  • This ticket conforms to the PRD associated with this part of ProcessMaker.

@caleeli caleeli requested a review from julceslauhub July 11, 2023 13:09
@caleeli caleeli changed the base branch from develop to FOUR-8177 July 11, 2023 13:10
@processmaker-sonarqube
Copy link
Copy Markdown

SonarQube Quality Gate

Quality Gate failed

Failed condition 0.0% 0.0% Coverage on New Code (is less than 80%)

See analysis details on SonarQube

@caleeli caleeli changed the title FOUR-8554 FOUR-8554 Refactor Sub Processes functions to use Nayra BPMN engine Jul 11, 2023

trait PersistenceTokenTrait
{
protected TokenRepository $tokenRepository;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is necessary? this property is defined in another class...

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Helps IDE to find the $tokenRepository type and definition

Copy link
Copy Markdown
Contributor

@julceslauhub julceslauhub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved

@caleeli caleeli merged commit d4de12b into FOUR-8177 Jul 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants